<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
    <!-- 引入 layui.css -->
    <link href="//unpkg.com/layui@2.7.6/dist/css/layui.css" rel="stylesheet">

    <!-- 引入 layui.js -->
    <script src="//unpkg.com/layui@2.7.6/dist/layui.js"></script>
</head>

<body>
    <button id="b">oooooo</button>

    <div class="layui-anim layui-anim-scale" id="msg" style="display: none;">
        <div>
            <p>邮件发送成功！</p>
            <img src="https://img0.baidu.com/it/u=1687336489,1326644303&fm=253&fmt=auto&app=138&f=JPEG?w=425&h=319" alt="">
        </div>
    </div>
    <!-- <div style="display: none;background-color: aquamarine;height: 200px;width: 20px;"></div> -->
</body>
<script>
    $(document).ready(function () {
        $("#b").on("click", function () {
            console.log(1)
            $("#msg").css({
                "display": "block"
            })

            // 两秒后消失
            setTimeout(function () {
                $("#msg").css({
                    "display": "none"
                })
            }, 2000);
        })
    })
</script>

</html>